/*****************************************************************************
 *
 *                      HUSONG PROPRIETARY INFORMATION
 *
 *          The information contained herein is proprietary to HUSONG
 *           and shall not be reproduced or disclosed in whole or in part
 *                    or used for any design or manufacture
 *              without direct written authorization from HUSONG.
 *
 *            Copyright (c) 2015 by HUSONG.  All rights reserved.
 *
 *****************************************************************************/
package me.send.data.service.mapper;

import java.util.List;

import me.send.data.service.pojo.OrderProgress;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

/**
 * @author maxmin
 *
 * @date 2015年10月15日 下午2:52:54
 */
public interface OrderProgressMapper {
	
	@Insert(value="INSERT INTO order_progress (order_status,createtime,updatetime,content,user_msg,orderid) "
			+ "values (#{orderStatus},#{createtime},#{updatetime},"
			+ "#{content},#{userMsg},#{orderid})")
	public Integer addOrderProgress(OrderProgress orderProgress);
	
	@Select(value="SELECT * FROM order_progress WHERE orderid=#{orderid} ORDER BY progress_id")
	@Results({
		@Result(column="progress_id",property="progressId"),
		@Result(column="order_status",property="orderStatus"),
		@Result(column="user_msg",property="userMsg"),
	})
	public List<OrderProgress> getOrderProgressesByOrderId(int orderid);
}
